Skip to content

chore: rewrite project structure#108

Open
jjfrench wants to merge 7 commits into
mainfrom
restructure
Open

chore: rewrite project structure#108
jjfrench wants to merge 7 commits into
mainfrom
restructure

Conversation

@jjfrench

@jjfrench jjfrench commented Jun 19, 2026

Copy link
Copy Markdown
Member

Description

Rewrites the project structure in python rather than TypeScript and Node - aims to not change any of the infrastructure

(would close open dependabot security issues for javascript)

Comment thread cdk/constructs/dps_stac_item_generator.py
@jjfrench jjfrench requested a review from hrodmn June 19, 2026 04:25

@hrodmn hrodmn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jjfrench thanks for taking this on! I have a few ideas for you to consider but don't have any very strong opinions here.

I think the most actionable one might be to consider breaking the big global Config class into smaller specific configs for various components. Right now we take the big Config and construct things like PgstacDbConfig directly from the Config properties. I think it would be cleaner and easier to maintain if we did not need to pass properties through the global Config to the lower level configs. That way if we change things or add a property we would only need to add it in one place rather than adding it to Config and adding it to XXXConfig.

We don't need to do it in this PR but it is probably time to break PgstacInfra into some smaller constructs! That thing is a beast.

Comment thread cdk/pgstac_infra.py Outdated
Comment thread cdk/config.py
Comment thread cdk/pgstac_infra.py
Comment thread app.py Outdated
@jjfrench jjfrench deployed to synthtest July 1, 2026 19:40 — with GitHub Actions Active
@jjfrench jjfrench requested a review from hrodmn July 1, 2026 19:50
@jjfrench

jjfrench commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

@hrodmn sorry, it's a lot to review again - but most of the recent changes are from porting over #110, ruff formatting, and shuffling the config classes around.

@hrodmn hrodmn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jjfrench thanks for all of your work on this. It might be worth one more pass at the config layout to make it simpler, but it's a compelx creature - none of my comments/suggestions are blocking.

Comment thread cdk/config.py
Comment on lines +227 to +228
def build_stack_name(self, service_id: str) -> str:
return f"MAAP-STAC-{self.stage}-{service_id}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's double check this is consistent so the stacks don't get re-created from scratch (maybe you already tested that)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been running cdk diff's to check - only the pgstac/user pgstac stacks lambda version modifications and a slight permission consolidation

Comment thread cdk/config.py
Comment thread cdk/config.py
Comment on lines +123 to +125
user_stac_catalog_transactions_enabled: Optional[bool] = None
user_stac_catalog_transactions_auth_mode: Optional[str] = None
user_stac_catalog_transactions_auth_secret_arn: Optional[str] = None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could just drop the _enabled type of settings and rely on the required fields being set, throw an error if any are missing.

Suggested change
user_stac_catalog_transactions_enabled: Optional[bool] = None
user_stac_catalog_transactions_auth_mode: Optional[str] = None
user_stac_catalog_transactions_auth_secret_arn: Optional[str] = None
user_stac_catalog_transactions_auth_mode: Optional[str] = None
user_stac_catalog_transactions_auth_secret_arn: Optional[str] = None

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to remember to clean up the Github environment variables afterwards

Comment thread cdk/config.py
user_stac_collection_transactions_enabled: Optional[bool] = None
user_stac_collection_transactions_auth_mode: Optional[str] = None
user_stac_collection_transactions_auth_secret_arn: Optional[str] = None
user_stac_collection_transactions: Optional[CollectionTransactionsConfig] = None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be an attribute or could it just be defined as a property? Seems to be derived from other attributes that are defined with env vars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants